﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine.EventSystems;

// 控制按钮
public class CtrlBtn
{
    Touch _btnDown;
    Touch _btnJump;

    public CtrlBtn()
    {
        _btnDown = UIManager.Instance.AddUI("UI/FightUI/BtnDown", UILayer.FightUI).GetComponent<Touch>();
        _btnJump = UIManager.Instance.AddUI("UI/FightUI/BtnJump", UILayer.FightUI).GetComponent<Touch>();
    }
        
    public void SetBtn(Action<PointerEventData> btnDownDown, Action<PointerEventData> btnDownUp, Action<PointerEventData> btnJumpDown, Action<PointerEventData> btnJumpUp)
    {
        _btnDown.OnPointerDownCallback = btnDownDown;
        _btnDown.OnPointerUpCallback = btnDownUp;
        _btnJump.OnPointerDownCallback = btnJumpDown;
        _btnJump.OnPointerUpCallback = btnJumpUp;
    }

}

